package com.manor.common.constant;

import com.manor.common.BuildConfig;
import com.manor.common.CommonAppContext;

import java.io.File;

public class PathConfig {
    public final static String FOLDER_NAME_GLIDE_CACHE = "glide";
    public final static String FOLDER_NAME_APK = "apk";
    public final static String FOLDER_NAME_TEMPORARY = "temporary";//存放临时文件的文件夹
    public final static String FOLDER_NAME_DOWNLOAD = "download";
    public final static String FOLDER_NAME_SONIC = "sonic";
    public final static String FOLDER_NAME_IMAGE = "image";
    public final static String FOLDER_NAME_PATCH = "patch";//热修复

    public static String getFolderAdapter_Q(String folderName, boolean withSeparator){
        String path = "";
            if (BuildConfig.DEBUG){
                path = CommonAppContext.sInstance.getExternalFilesDir("") + File.separator + folderName;
            }else {
                path = CommonAppContext.sInstance.getExternalFilesDir("") + File.separator + "." + folderName;
            }
        if (withSeparator){
            path = path + File.separator;
        }
        return path;
    }
}
